/**
 * Application.java
 * com.lyj.eureka.server
 * Function： TODO add descript
 *
 *   ver     date      		author
 * ──────────────────────────────────
 *   		 2017年9月12日       lyj
 *
 * Copyright (c) 2017, TNT All Rights Reserved.
*/

package com.lyj.ribbon.one;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;



/**
 * ClassName:Application
 * Function: TODO ADD FUNCTION
 * Reason:	 TODO ADD REASON
 *
 * @author   lyj
 * @version  
 * @since    version 1.0
 * @Date	 2017年9月12日	下午12:33:18
 *
 * @see 	 
 *  
 */

@SpringBootApplication
@EnableDiscoveryClient
@EnableHystrix
public class Application {
	
	public static void main(String[] args) {
		
        SpringApplication.run(Application.class, args);

		
	}
	

	/**
	 * restTemplate:注册RestTemplate
	 * TODO 维护负载均衡
	 *
	 * @param  @return    
	 * @return RestTemplate    
	 * @throws 
	 * @since  　version 1.0
	*/
	@Bean
	@LoadBalanced
	RestTemplate restTemplate(){
		
		return new RestTemplate();
	}
	
	


}
